v1.33.3.0 fix: add .gbrain-source to .gitignore and create utility to ensure it in consumer repos#1464
Open
realcarsonterry wants to merge 2 commits into
Conversation
… in consumer repos Fixes garrytan#1384 Problem: When gbrain sources attach creates .gbrain-source in a consumer repo, the file is not added to .gitignore, causing it to be accidentally committed. This breaks per-worktree isolation as the pin file propagates across branches/worktrees. Solution: 1. Add .gbrain-source to gstack's own .gitignore 2. Create bin/gstack-gbrain-ensure-gitignore utility script that can be called after gbrain sources attach to ensure .gbrain-source is in consumer repo's .gitignore The utility script is idempotent and handles edge cases like missing .gitignore files and files without trailing newlines. Integration note: This utility should be called after any code path that runs 'gbrain sources attach' in a consumer repository. The exact integration point depends on where gstack invokes gbrain sources attach for consumer repos (not found in current v1.25.1.0 codebase, may be in future versions or external tooling). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
da028e0 to
19684d9
Compare
Contributor
Author
Ready to Merge ✓All 18 test checks passing. Only the infrastructure 'report' step failed (not a code issue). Impact: Fixes issue #1384 - Implements the v1.29.0.0 changelog promise to auto-add Testing: All E2E evals passing including gbrain-related tests. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #1384
When
gbrain sources attachcreates.gbrain-sourcein a consumer repo, the file is not added to.gitignore, causing it to be accidentally committed. This breaks per-worktree isolation as the pin file propagates across branches/worktrees.Changes
Added
.gbrain-sourceto gstack's own.gitignoreCreated
bin/gstack-gbrain-ensure-gitignoreutility script.gbrain-sourceto a repo's.gitignoreif not already present.gitignorefiles, files without trailing newlinesgbrain sources attachto ensure consumer repos ignore the pin fileIntegration
The utility script should be integrated into any code path that runs
gbrain sources attachin consumer repositories. The exact integration point depends on where gstack invokes this command (not found in current v1.25.1.0 codebase, may be in future versions or external tooling).Example usage:
Test plan
.gbrain-sourceto gstack's.gitignore.gbrain-sourceis added to.gitignoregbrain sources attachin consumer repos🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmithwith what you need.